﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include "components/FWidgets/Base/FMainWindow.h"

#include <QCloseEvent>

class SysTrayIcon;
class MenuButton;
class TouchToolWidget;
class TIScriptWidget;

namespace Ui {
class MainWindow;
}

using BaseWindow = FMainWindow;

class MainWindow : public BaseWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    void setWindowTitle();

protected:
    void initSignalSlot();
    void initView();
    void initBackground();
    void initShortcut();
    void showSomeStatus();

private slots:
    void closeEvent(QCloseEvent*) override;
    void onShowGuideTriggered();

    void on_btnHWSerial_clicked();

    void on_btnPrjOpen_clicked();

    void on_btnPrjNew_clicked();

    void on_btnPrjSave_clicked();

    void on_btnPrjSaveAs_clicked();

    void on_btnPrjQuit_clicked();

    void on_btnToolTBU_clicked();

    void on_btnHelpSetting_clicked();

    void on_btnHelpAbout_clicked();

    void on_btnHelpHelp_clicked();

    void on_btnTouchTool_clicked();

    void on_btnTiScript_clicked();

private:
    Ui::MainWindow *ui;

    SysTrayIcon* m_tray;
    MenuButton* m_btnMenu;
    TouchToolWidget* m_touchWgt;
    TIScriptWidget* m_tiWgt;
};

#endif // MAINWINDOW_H
